.class public Lcom/hierynomus/smbj/smb2/c;
.super Ljava/lang/Object;
.source "SMB2Header.java"


# instance fields
.field private a:Lcom/hierynomus/smbj/smb2/SMB2Dialect;

.field private b:I

.field private c:I

.field private d:I

.field private e:Lcom/hierynomus/smbj/smb2/SMB2MessageCommandCode;

.field private f:J

.field private g:J

.field private h:J

.field private i:J

.field private j:Lcom/hierynomus/mserref/NtStatus;

.field private k:J

.field private l:J

.field private m:J


# direct methods
.method public constructor <init>()V
    .locals 0

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method private b(Lcom/hierynomus/smbj/common/b;)V
    .locals 2

    .line 1
    iget-object v0, p0, Lcom/hierynomus/smbj/smb2/c;->a:Lcom/hierynomus/smbj/smb2/SMB2Dialect;

    invoke-virtual {v0}, Lcom/hierynomus/smbj/smb2/SMB2Dialect;->isSmb3x()Z

    move-result v0

    if-nez v0, :cond_0

    .line 2
    invoke-virtual {p1}, Lcom/hierynomus/smbj/common/b;->n()Lcom/hierynomus/protocol/commons/buffer/Buffer;

    return-void

    :cond_0
    const/4 v0, 0x2

    new-array v1, v0, [B

    .line 3
    fill-array-data v1, :array_0

    invoke-virtual {p1, v1}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->a([B)Lcom/hierynomus/protocol/commons/buffer/Buffer;

    .line 4
    invoke-virtual {p1, v0}, Lcom/hierynomus/smbj/common/b;->i(I)Lcom/hierynomus/protocol/commons/buffer/Buffer;

    .line 5
    new-instance p1, Ljava/lang/UnsupportedOperationException;

    const-string v0, "SMB 3.x not yet implemented"

    invoke-direct {p1, v0}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V

    throw p1

    :array_0
    .array-data 1
        0x0t
        0x0t
    .end array-data
.end method

.method private c(Lcom/hierynomus/smbj/common/b;)V
    .locals 3

    .line 1
    sget-object v0, Lcom/hierynomus/smbj/smb2/c$a;->a:[I

    iget-object v1, p0, Lcom/hierynomus/smbj/smb2/c;->a:Lcom/hierynomus/smbj/smb2/SMB2Dialect;

    invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I

    move-result v1

    aget v0, v0, v1

    const/4 v1, 0x1

    const/4 v2, 0x2

    if-eq v0, v1, :cond_0

    if-eq v0, v2, :cond_0

    .line 2
    iget v0, p0, Lcom/hierynomus/smbj/smb2/c;->b:I

    invoke-virtual {p1, v0}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->c(I)Lcom/hierynomus/protocol/commons/buffer/Buffer;

    goto :goto_0

    .line 3
    :cond_0
    invoke-virtual {p1, v2}, Lcom/hierynomus/smbj/common/b;->i(I)Lcom/hierynomus/protocol/commons/buffer/Buffer;

    :goto_0
    return-void
.end method


# virtual methods
.method public a()J
    .locals 2

    .line 20
    iget-wide v0, p0, Lcom/hierynomus/smbj/smb2/c;->g:J

    return-wide v0
.end method

.method public a(I)V
    .locals 0

    .line 19
    iput p1, p0, Lcom/hierynomus/smbj/smb2/c;->b:I

    return-void
.end method

.method public a(J)V
    .locals 0

    .line 16
    iput-wide p1, p0, Lcom/hierynomus/smbj/smb2/c;->f:J

    return-void
.end method

.method public a(Lcom/hierynomus/protocol/commons/buffer/Buffer;)V
    .locals 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/hierynomus/protocol/commons/buffer/Buffer<",
            "*>;)V"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/hierynomus/protocol/commons/buffer/Buffer$BufferException;
        }
    .end annotation

    .line 21
    invoke-virtual {p1}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->g()I

    move-result v0

    .line 22
    sget-object v1, Ljava/lang/System;->out:Ljava/io/PrintStream;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "structureSize:"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 23
    invoke-virtual {p1}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->e()B

    move-result v0

    .line 24
    sget-object v1, Ljava/lang/System;->out:Ljava/io/PrintStream;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "errorCount:"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 25
    invoke-virtual {p1}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->e()B

    .line 26
    invoke-virtual {p1}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->i()J

    move-result-wide v0

    .line 27
    sget-object v2, Ljava/lang/System;->out:Ljava/io/PrintStream;

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "byteCount:"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3, v0, v1}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    const-wide/16 v2, 0x0

    cmp-long v4, v0, v2

    if-eqz v4, :cond_0

    long-to-int v1, v0

    .line 28
    invoke-virtual {p1, v1}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->e(I)[B

    :cond_0
    return-void
.end method

.method public a(Lcom/hierynomus/smbj/common/b;)V
    .locals 3

    const/4 v0, 0x4

    new-array v0, v0, [B

    .line 1
    fill-array-data v0, :array_0

    invoke-virtual {p1, v0}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->a([B)Lcom/hierynomus/protocol/commons/buffer/Buffer;

    const/16 v0, 0x40

    .line 2
    invoke-virtual {p1, v0}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->c(I)Lcom/hierynomus/protocol/commons/buffer/Buffer;

    .line 3
    invoke-direct {p0, p1}, Lcom/hierynomus/smbj/smb2/c;->c(Lcom/hierynomus/smbj/common/b;)V

    .line 4
    invoke-direct {p0, p1}, Lcom/hierynomus/smbj/smb2/c;->b(Lcom/hierynomus/smbj/common/b;)V

    .line 5
    iget-object v0, p0, Lcom/hierynomus/smbj/smb2/c;->e:Lcom/hierynomus/smbj/smb2/SMB2MessageCommandCode;

    invoke-virtual {v0}, Lcom/hierynomus/smbj/smb2/SMB2MessageCommandCode;->getValue()I

    move-result v0

    invoke-virtual {p1, v0}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->c(I)Lcom/hierynomus/protocol/commons/buffer/Buffer;

    .line 6
    iget v0, p0, Lcom/hierynomus/smbj/smb2/c;->c:I

    invoke-virtual {p1, v0}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->c(I)Lcom/hierynomus/protocol/commons/buffer/Buffer;

    .line 7
    iget-wide v0, p0, Lcom/hierynomus/smbj/smb2/c;->l:J

    invoke-virtual {p1, v0, v1}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->b(J)Lcom/hierynomus/protocol/commons/buffer/Buffer;

    .line 8
    iget-wide v0, p0, Lcom/hierynomus/smbj/smb2/c;->m:J

    invoke-virtual {p1, v0, v1}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->b(J)Lcom/hierynomus/protocol/commons/buffer/Buffer;

    .line 9
    iget-wide v0, p0, Lcom/hierynomus/smbj/smb2/c;->f:J

    invoke-virtual {p1, v0, v1}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->c(J)Lcom/hierynomus/protocol/commons/buffer/Buffer;

    .line 10
    iget-wide v0, p0, Lcom/hierynomus/smbj/smb2/c;->l:J

    sget-object v2, Lcom/hierynomus/smbj/smb2/SMB2MessageFlag;->SMB2_FLAGS_ASYNC_COMMAND:Lcom/hierynomus/smbj/smb2/SMB2MessageFlag;

    invoke-static {v0, v1, v2}, Les/ed0$a;->a(JLes/ed0;)Z

    move-result v0

    if-nez v0, :cond_0

    .line 11
    invoke-virtual {p1}, Lcom/hierynomus/smbj/common/b;->n()Lcom/hierynomus/protocol/commons/buffer/Buffer;

    .line 12
    iget-wide v0, p0, Lcom/hierynomus/smbj/smb2/c;->i:J

    invoke-virtual {p1, v0, v1}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->b(J)Lcom/hierynomus/protocol/commons/buffer/Buffer;

    .line 13
    iget-wide v0, p0, Lcom/hierynomus/smbj/smb2/c;->h:J

    invoke-virtual {p1, v0, v1}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->a(J)Lcom/hierynomus/protocol/commons/buffer/Buffer;

    const/16 v0, 0x10

    new-array v0, v0, [B

    .line 14
    fill-array-data v0, :array_1

    invoke-virtual {p1, v0}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->a([B)Lcom/hierynomus/protocol/commons/buffer/Buffer;

    return-void

    .line 15
    :cond_0
    new-instance p1, Ljava/lang/UnsupportedOperationException;

    const-string v0, "ASYNC not yet implemented"

    invoke-direct {p1, v0}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V

    throw p1

    nop

    :array_0
    .array-data 1
        -0x2t
        0x53t
        0x4dt
        0x42t
    .end array-data

    :array_1
    .array-data 1
        0x0t
        0x0t
        0x0t
        0x0t
        0x0t
        0x0t
        0x0t
        0x0t
        0x0t
        0x0t
        0x0t
        0x0t
        0x0t
        0x0t
        0x0t
        0x0t
    .end array-data
.end method

.method public a(Lcom/hierynomus/smbj/smb2/SMB2Dialect;)V
    .locals 0

    .line 18
    iput-object p1, p0, Lcom/hierynomus/smbj/smb2/c;->a:Lcom/hierynomus/smbj/smb2/SMB2Dialect;

    return-void
.end method

.method a(Lcom/hierynomus/smbj/smb2/SMB2MessageCommandCode;)V
    .locals 0

    .line 17
    iput-object p1, p0, Lcom/hierynomus/smbj/smb2/c;->e:Lcom/hierynomus/smbj/smb2/SMB2MessageCommandCode;

    return-void
.end method

.method public b()I
    .locals 1

    .line 8
    iget v0, p0, Lcom/hierynomus/smbj/smb2/c;->d:I

    return v0
.end method

.method public b(I)V
    .locals 0

    .line 7
    iput p1, p0, Lcom/hierynomus/smbj/smb2/c;->c:I

    return-void
.end method

.method public b(J)V
    .locals 0

    .line 6
    iput-wide p1, p0, Lcom/hierynomus/smbj/smb2/c;->h:J

    return-void
.end method

.method public b(Lcom/hierynomus/protocol/commons/buffer/Buffer;)V
    .locals 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/hierynomus/protocol/commons/buffer/Buffer<",
            "*>;)V"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/hierynomus/protocol/commons/buffer/Buffer$BufferException;
        }
    .end annotation

    const/4 v0, 0x4

    .line 9
    invoke-virtual {p1, v0}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->g(I)Lcom/hierynomus/protocol/commons/buffer/Buffer;

    const/4 v1, 0x2

    .line 10
    invoke-virtual {p1, v1}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->g(I)Lcom/hierynomus/protocol/commons/buffer/Buffer;

    .line 11
    invoke-virtual {p1}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->g()I

    move-result v1

    iput v1, p0, Lcom/hierynomus/smbj/smb2/c;->b:I

    .line 12
    invoke-virtual {p1}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->i()J

    move-result-wide v1

    iput-wide v1, p0, Lcom/hierynomus/smbj/smb2/c;->k:J

    .line 13
    const-class v3, Lcom/hierynomus/mserref/NtStatus;

    sget-object v4, Lcom/hierynomus/mserref/NtStatus;->UNKNOWN:Lcom/hierynomus/mserref/NtStatus;

    invoke-static {v1, v2, v3, v4}, Les/ed0$a;->a(JLjava/lang/Class;Les/ed0;)Les/ed0;

    move-result-object v1

    check-cast v1, Lcom/hierynomus/mserref/NtStatus;

    iput-object v1, p0, Lcom/hierynomus/smbj/smb2/c;->j:Lcom/hierynomus/mserref/NtStatus;

    .line 14
    invoke-virtual {p1}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->g()I

    move-result v1

    invoke-static {v1}, Lcom/hierynomus/smbj/smb2/SMB2MessageCommandCode;->lookup(I)Lcom/hierynomus/smbj/smb2/SMB2MessageCommandCode;

    move-result-object v1

    iput-object v1, p0, Lcom/hierynomus/smbj/smb2/c;->e:Lcom/hierynomus/smbj/smb2/SMB2MessageCommandCode;

    .line 15
    invoke-virtual {p1}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->g()I

    move-result v1

    iput v1, p0, Lcom/hierynomus/smbj/smb2/c;->d:I

    .line 16
    invoke-virtual {p1}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->i()J

    move-result-wide v1

    iput-wide v1, p0, Lcom/hierynomus/smbj/smb2/c;->l:J

    .line 17
    invoke-virtual {p1}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->i()J

    move-result-wide v1

    iput-wide v1, p0, Lcom/hierynomus/smbj/smb2/c;->m:J

    .line 18
    invoke-virtual {p1}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->k()J

    move-result-wide v1

    iput-wide v1, p0, Lcom/hierynomus/smbj/smb2/c;->f:J

    .line 19
    iget-wide v1, p0, Lcom/hierynomus/smbj/smb2/c;->l:J

    sget-object v3, Lcom/hierynomus/smbj/smb2/SMB2MessageFlag;->SMB2_FLAGS_ASYNC_COMMAND:Lcom/hierynomus/smbj/smb2/SMB2MessageFlag;

    invoke-static {v1, v2, v3}, Les/ed0$a;->a(JLes/ed0;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 20
    invoke-virtual {p1}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->k()J

    move-result-wide v0

    iput-wide v0, p0, Lcom/hierynomus/smbj/smb2/c;->g:J

    goto :goto_0

    .line 21
    :cond_0
    invoke-virtual {p1, v0}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->g(I)Lcom/hierynomus/protocol/commons/buffer/Buffer;

    .line 22
    invoke-virtual {p1}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->i()J

    move-result-wide v0

    iput-wide v0, p0, Lcom/hierynomus/smbj/smb2/c;->i:J

    .line 23
    :goto_0
    invoke-virtual {p1}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->f()J

    move-result-wide v0

    iput-wide v0, p0, Lcom/hierynomus/smbj/smb2/c;->h:J

    const/16 v0, 0x10

    .line 24
    invoke-virtual {p1, v0}, Lcom/hierynomus/protocol/commons/buffer/Buffer;->e(I)[B

    return-void
.end method

.method public c()J
    .locals 2

    .line 5
    iget-wide v0, p0, Lcom/hierynomus/smbj/smb2/c;->l:J

    return-wide v0
.end method

.method public c(J)V
    .locals 0

    .line 4
    iput-wide p1, p0, Lcom/hierynomus/smbj/smb2/c;->i:J

    return-void
.end method

.method public d()J
    .locals 2

    .line 1
    iget-wide v0, p0, Lcom/hierynomus/smbj/smb2/c;->f:J

    return-wide v0
.end method

.method public e()J
    .locals 2

    .line 1
    iget-wide v0, p0, Lcom/hierynomus/smbj/smb2/c;->h:J

    return-wide v0
.end method

.method public f()Lcom/hierynomus/mserref/NtStatus;
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/hierynomus/smbj/smb2/c;->j:Lcom/hierynomus/mserref/NtStatus;

    return-object v0
.end method

.method public g()J
    .locals 2

    .line 1
    iget-wide v0, p0, Lcom/hierynomus/smbj/smb2/c;->i:J

    return-wide v0
.end method
